package com.example.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.mapper.EmpMapper;
import com.example.mapper.ResumeMapper;
import com.example.pojo.Resume;
import com.example.service.IPersonalHomeService;
import com.example.service.IResumeService;
import com.example.util.JwtTokenUtil;
import com.example.vo.ResultVo;
import com.example.vo.respvo.ResumeVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;

/**
 * @author wsl
 */
@Service
public class PersonalHomeServiceImpl implements IPersonalHomeService {

    @Autowired
    private JwtTokenUtil jwtTokenUtil;

    @Autowired
    private ResumeMapper resumeMapper;

    @Override
    public ResultVo getPersonalResume(HttpServletRequest request) {
        String userId = jwtTokenUtil.getUserIdFormToken(request);
        ResumeVo empResume = resumeMapper.selectEmpResume(userId);
        return ResultVo.response(empResume);
    }
}
